home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
101-125
/
scopedisk114
/
fastmenu
/
prtsetup.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-03-19
|
3KB
|
84 lines
/* Set various printer parameters through AmigaDos escape codes */
/* Run ONLY under FastMenu1 as program expects certain libraries */
/* are open. These libraries are opened by FastMenu. */
if ~show('P','FASTHOST') then do
say 'FastMenu1 is not present ... Aborting'
exit 10
end
if show('P','PSETHOST') then do
say 'PSETHOST Port in Use or PrtSetup Program Running ... Aborting'
exit 10
end
call MenuWindow(PSETHOST,PSETPORT)
call AddGadget(PSETHOST,6,11,"CONON","Condensed On ", /* + */,
"'call open(PRINTER,''PRT:'');call writeln(PRINTER,''1b5b3477''x);call close(PRINTER)'")
call AddGadget(PSETHOST,124,11,"CONOFF","Condensed Off", /* + */,
"'call open(PRINTER,''PRT:'');call writeln(PRINTER,''1b5b3377''x);call close(PRINTER)'")
call AddGadget(PSETHOST,6,22,"ELON", " Elite On ", /* + */,
"'call open(PRINTER,''PRT:'');call writeln(PRINTER,''1b5b3277''x);call close(PRINTER)'")
call AddGadget(PSETHOST,124,22,"ELOFF", " Elite Off ", /* + */,
"'call open(PRINTER,''PRT:'');call writeln(PRINTER,''1b5b3177''x);call close(PRINTER)'")
call AddGadget(PSETHOST,6,33,"LQON", " NLQ On ", /* + */,
"'call open(PRINTER,''PRT:'');call writeln(PRINTER,''1b5b32227a''x);call close(PRINTER)'")
call AddGadget(PSETHOST,124,33,"LQOFF", " NLQ Off ", /* + */,
"'call open(PRINTER,''PRT:'');call writeln(PRINTER,''1b5b31227a''x);call close(PRINTER)'")
call AddGadget(PSETHOST,6,44,"6LPI", " 6 LPI ", /* + */,
"'call open(PRINTER,''PRT:'');call writeln(PRINTER,''1b5b317a''x);call close(PRINTER)'")
call AddGadget(PSETHOST,124,44,"8LPI", " 8 LPI ", /* + */,
"'call open(PRINTER,''PRT:'');call writeln(PRINTER,''1b5b307a''x);call close(PRINTER)'")
call AddGadget(PSETHOST,6,55,"PERF0", "Skip Perf 0 ", /* + */,
"'call open(PRINTER,''PRT:'');call writeln(PRINTER,''1b5b3071''x);call close(PRINTER)'")
call AddGadget(PSETHOST,124,55,"PERF8", "Skip Perf 8 ", /* + */,
"'call open(PRINTER,''PRT:'');call writeln(PRINTER,''1b5b3871''x);call close(PRINTER)'")
call AddGadget(PSETHOST,6,66,"LFEED", " Line Feed ", /* + */,
"'call open(PRINTER,''PRT:'');call writeln(PRINTER,''1b44''x);call close(PRINTER)'")
call AddGadget(PSETHOST,124,66,"FFEED", " Form Feed ", /* + */,
"'call open(PRINTER,''PRT:'');call writeln(PRINTER,''0c''x);call close(PRINTER)'")
call AddGadget(PSETHOST,6,77,"INIT", " Initialize ", /* + */,
"'call open(PRINTER,''PRT:'');call writeln(PRINTER,''1b2331 1b63''x);call close(PRINTER)'")
call AddGadget(PSETHOST,124,77,"QUIT", " Quit ", /* + */,
"'address PSETHOST quit'")
call SetNotify(PSETHOST,GADGETUP,REXX)
call SetNotify(PSETHOST,CLOSEWINDOW,PSETHOST)
exit 0
/* MenuWindow.rexx - menu making function */
MenuWindow:
arg menuhost, menuport
address AREXX "'x=createhost(" menuhost "," menuport ")'"
mp = openport(menuport)
do for 10/(10/50) while ~showlist('p',menuhost)
call delay 10
end
if ~(mp & showlist('p',menuhost)) then
return
idcmp = 'CLOSEWINDOW+GADGETUP'
flags = 'WINDOWDRAG+BACKFILL+WINDOWCLOSE'
width = 240
height = 7*11+14
xpos =0
ypos = screenrows()-height
txt_wid = trunc((width-26)/8) + 1
win_text = center('Printer Setup',txt_wid)
call SetReqColor(menuhost,BLOCK,3)
/* Open the menu window in the upper left-hand corner */
call OpenWindow(menuhost,xpos,ypos,width,height,idcmp, flags,win_text)
return 0